# Support for out-of-tree builds (VPATH)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@

INC=-I$(top_srcdir)/src/include -I$(top_builddir)/src/include
LIBNDPI=$(top_builddir)/src/lib/libndpi.a
LIBS=$(LIBNDPI) @PCAP_LIB@ @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@

all: hosts2domains print_rank

hosts2domains: $(srcdir)/hosts2domains.c Makefile
	$(CC) $(INC) -g $(srcdir)/hosts2domains.c -o hosts2domains $(LIBS)

print_rank: $(srcdir)/print_rank.c Makefile
	$(CC) $(INC) -g $(srcdir)/print_rank.c -o print_rank $(LIBS)

clean:
	$(RM) hosts2domains print_rank *.o

distclean: clean
	$(RM) Makefile
